package com.huffman.smart_picture.domain.request.space;

import com.huffman.smart_picture.domain.entity.Space;
import lombok.Data;

import java.io.Serializable;

@Data
public class SpaceCreateRequest implements Serializable {

    /**
     * 空间名称
     */
    private String spaceName;

    /**
     * 空间简介
     */
    private String profile;

    /**
     * 空间级别：0-普通版 1-专业版 2-旗舰版
     */
    private Integer spaceLevel;

    private static final long serialVersionUID = 1L;


    public static Space convert(SpaceCreateRequest spaceCreateRequest){
        Space space = new Space();
        space.setSpaceName(spaceCreateRequest.getSpaceName());
        space.setSpaceLevel(spaceCreateRequest.getSpaceLevel());
        space.setProfile(spaceCreateRequest.getProfile());
        return space;
    }
}
